<div class="apply-process pro_affiliate">
  <div class="{% unless section.settings.full_width %}page-width{% endunless %}">
      {%- if section.settings.heading != blank -%}
       <div class="affiliate-title">
        <div class="title">
          <span>{{ section.settings.heading | escape }}</span>
       </div> 
          {%- if section.settings.text != blank -%}
              <div class="rte">{{ section.settings.text }}</div>
          {%- endif -%}
       </div> 
     {%- endif -%}
     <div class="tenways-Process">
      {%- for block in section.blocks -%}
      {% case block.type %}
      {%- when 'step' -%}
         <div class="process">
           <div class="process-list">
            <div class="step">
              <div class="pro_list">
                <p>
                    {%- if block.settings.title != blank -%}
                    {{ block.settings.title }}
                    {%- endif -%}
                </p>
               </div>
            </div>
           </div>
           {%- if block.settings.text != blank -%}
          <div class="text"> {{ block.settings.text }}</div>
           {%- endif -%}
         </div>
         <span class="job-arrow"> {% render 'job-arrow' %} </span>
        {%- when 'final' -%} 
        <div class="process final">
          <div class="process-list">
            <div class="change-affiliate"> 
              
              <a target="_blank" {% if block.settings.button_link != blank %} href="{{ block.settings.button_link }}"{% endif %} {% if block.settings.button_link == blank %} aria-disabled="true"{% endif %}>
                {%- if block.settings.html != blank -%}
                <div class="change-html affiliate-bg">
                  {{ block.settings.html }}
                </div>
              {%- endif -%}
              </a>
            </div>
          </div>
          {%- if block.settings.text != blank -%}
         <div class="text"> {{ block.settings.text }}</div>
          {%- endif -%}
        </div>
        {%- endcase -%}
        {%- endfor -%}
     </div>
  </div>
</div>

{% schema %}
{
"name": "Apply process",
"tag": "section",
"class": "spaced-section spaced-section--full-width",
"settings": [
{
  "type": "text",
  "id": "heading",
  "default": "Talk about your brand",
  "label": "Heading"
},
{
  "type": "richtext",
  "id": "text",
  "default": "<p>Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.</p>",
  "label": "Text"
},
{
  "type": "checkbox",
  "id": "full_width",
  "default": false,
  "label": "t:sections.rich-text.settings.full_width.label"
}
],
"blocks": [
{
  "type": "step",
  "name": "step",
  "settings": [
    {
      "type": "text",
      "id": "title",
      "default": "Step",
      "label": "Step"
    },
    {
      "type": "richtext",
      "id": "text",
      "label": "Text"
    }
  ]
},
{
  "type": "final",
  "name": "final",
  "settings": [
  {
    "type": "url",
    "id": "button_link",
    "label": "Button link"
  },
  { 
    "type": "html",
    "id": "html",
    "label": "Icon"
  },
    {
      "type": "text",
      "id": "title",
      "label": "Step"
    },
    {
      "type": "richtext",
      "id": "text",
      "label": "Text"
    }
  ]
}
],
"presets": [
  {
    "name": "Apply process"
  }
]
}
{% endschema %}
